{foreach $topMenu as $mpg}
	{if $mpg.depth == 0}
		<li {if $mpg.link==$smarty.server.REQUEST_URI || ($mpg.link=='/catalog' && $smarty.server.REQUEST_URI|truncate:8:''=='/details')}class="active"{/if} {if $mpg@last}class="last"{/if}><a {if $mpg.id=='main'}class="home"{/if} href="{$mpg.link}">{if $mpg.id=='main'}HOME{else}<span>{$mpg.name}{/if}</span></a></li>
	{/if}
{/foreach}